﻿<link href="@Url.Content("~/content/activitie_detail.css")" rel="stylesheet" type="text/css"/>

@model PessMvc.Models.ActivityProgressModel

@{
    ViewBag.Title = "Progress";
}

<div id="m-title">
    <h2>评分进度</h2>
    <div id="m-op">
        @Html.ActionLink("返回", "Details", new { id = Model.ActivityID })
    </div>
</div>

@{var aRate = 0m;
  if (Model.ArchiveTotal!=0)
  { aRate=decimal.Parse(Model.ArchiveGradedTotal.ToString()) / decimal.Parse(Model.ArchiveTotal.ToString()); }
  }
  
<h3 class="showTxt">档案总数 <span>@Model.ArchiveTotal</span> 个，已完成评分 <span>@Model.ArchiveGradedTotal</span> 个，完成率 <span>@(string.Format("{0:0.#}%", aRate * 100))</span></h3>
<table class="oddTable showProgress">
    <tr>
        <th>学科</th>
        <th>档案数</th>
        <th>已评分档案数</th>
        <th>完成率</th>
    </tr>
    @foreach (var m in Model.SubjectProgressList)
    {
        <tr>
            <td>@m.SubjectName</td>
            <td>@m.ArchiveTotal</td>
            <td>@m.ArchiveGradedCount</td>
            <td>@{decimal rate = decimal.Parse((m.ArchiveGradedCount == null ? 0 : m.ArchiveGradedCount).ToString()) / decimal.Parse((m.ArchiveTotal == null ? 0 : m.ArchiveTotal).ToString());}
                @(string.Format("{0:0.#}%", rate*100))
            </td>
        </tr>
    }
</table>

